/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sda.levelup.rating;

/**
 *
 * @author Дима
 */
public class User implements Comparable<User>
{
    private int id;
    private int rating;
    private int page;

    public User() {
    }

    
    public User(int id, int rating) {
        this.id = id;
        this.rating = rating;
    }

    public User(int id, int rating, int page) {
        this.id = id;
        this.rating = rating;
        this.page = page;
    }
    
    

    public void setId(int id) {
        this.id = id;
    }

    public void setRating(int rating) {
        this.rating = rating;
    }

    public int getId() {
        return id;
    }

    public int getRating() {
        return rating;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getPage() {
        return page;
    }
    
    
    @Override
    public int compareTo(User u){
        return this.id-u.id;
    }

    @Override
    public String toString() {
        return id+"-"+rating+"-"+page;
    }
    
}
